package work.vcloud.baseinfo.exception;

/**
 * 基础异常
 */
public class BaseException extends RuntimeException {
    private String code;
    private String message;

    public BaseException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BaseException(String message) {
        super(message);
        this.code = "500";
        this.message = message;
    }

    public BaseException(String message, Throwable ex) {
        super(message, ex);
        this.code = "500";
        this.message = message;
    }

    public BaseException(String code, String message, Throwable ex) {
        super(message, ex);
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }
}
